﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraBars;
using DevExpress.Skins;
using DevExpress.LookAndFeel;
using DevExpress.UserSkins;
using DevExpress.XtraBars.Ribbon;
using DevExpress.XtraBars.Helpers;

namespace GUI
{
    public partial class FrmControler : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        FrmMain frmmian;
        public FrmControler(FrmMain frmmian)
        {
            this.frmmian = frmmian;
            InitializeComponent();
            InitSkinGallery();
        }

        void InitSkinGallery()
        {
            SkinHelper.InitSkinGallery(ribSkin, true);
        }

        private void btnClose_ItemClick(object sender, ItemClickEventArgs e)
        {
            foreach (var frm in MdiChildren) frm.Close();
        }

        private void btnSanpham_ItemClick(object sender, ItemClickEventArgs e)
        {
            foreach (var x in MdiChildren) if (x is FrmControlerSanpham) return;
            var frm = new FrmControlerSanpham() { MdiParent = this };

            frm.Show();
        }
    }
}